package com.test3;

import org.junit.Test;

interface IGenerator<T> {
    public void send(T t);
}

class GeneratorImpl1<T> implements IGenerator<T> {
    @Override
    public void send(T t) {
        System.out.println("【发送消息】" + t);
    }
}

class GeneratorImpl2 implements IGenerator<String> {
    @Override
    public void send(String t) {
        System.out.println("【发送消息】" + t);
    }
}

public class MyTest_02 {

    @Test
    public void test1() {
        IGenerator<Integer> generator = new GeneratorImpl1<>();
        generator.send(9527);
        IGenerator<String> generatorB = new GeneratorImpl2();
        generatorB.send("LXH_JAVA");
    }
}
